package com.imageim.yimirror.common.util;

import android.widget.Toast;

import com.imageim.yimirror.base.BaseApplication;


public class ToastUtil {

    private static Toast toast;

    public static void show(String msg) {
        if (toast == null) {
            toast = Toast.makeText(BaseApplication.getContext(), msg, Toast.LENGTH_SHORT);
        } else {
            toast.setText(msg);
        }
        toast.show();
    }

    public static void show(int resId) {
        if (toast == null) {
            toast = Toast.makeText(BaseApplication.getContext(), resId, Toast.LENGTH_SHORT);
        } else {
            toast.setText(resId);
        }
        toast.show();
    }
}
